package com.chen.util;

import static java.lang.Math.random;

/**
 * @author JohnSong
 * @date 2019/9/24 22:10
 **/
public class captchaCode {
    private static final int DEFAULT_NUM = 100000;
    public static String code(){
        int code=0;
        while (code<=DEFAULT_NUM){
            code = code * 10 + (int) (random() * 10);
        }
        return String.valueOf(code);
    }

}
